package com.buer.storage.business.service.impl;


import com.buer.storage.business.dao.DepartmentDao;
import com.buer.storage.business.domain.Department;
import com.buer.storage.business.dto.DepartmentDto;
import com.buer.storage.business.service.DepartmentService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

//库位管理
@Service
public class DepartmentServiceImpl implements DepartmentService {

    @Resource
    private DepartmentDao departmentDao;

    //增加库位
    @Override
    public int add(DepartmentDto departmentDto) {
        return departmentDao.add(departmentDto);
    }

    //删除库位
    @Override
    public int delete(Integer departmentId) {
        return departmentDao.delete(departmentId);
    }

    //修改库位
    @Override
    public int update(DepartmentDto departmentDto) {
        return departmentDao.update(departmentDto);
    }

    //查询所有库位
    @Override
    public List<Department> select() {
        return departmentDao.select();
    }




}
